package com.smsc.headend.task.engine.config;

import io.micrometer.core.instrument.Counter;
import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MetricsConfig {
    @Bean
    public MeterRegistry registry() {
        return new SimpleMeterRegistry();
    }

    @Bean("taskCONInbound")
    public Counter taskConInboundCounter(MeterRegistry registry) {
        return Counter.builder("ute.con.inbound.counter").description("task inbound to UTE from CON").register(registry);
    }

    @Bean("taskCONOutbound")
    public Counter taskOutboundCONCounter(MeterRegistry registry) {
        return Counter.builder("ute.con.outbound.counter").description("task outbound to CON").register(registry);
    }

    @Bean("taskUTGInbound")
    public Counter taskInboundCounter(MeterRegistry registry) {
        return Counter.builder("ute.utg.task.inbound").description("task inbound UTE from UTG").register(registry);
    }

    @Bean("taskUTGOutbound")
    public Counter taskOutboundCounter(MeterRegistry registry) {
        return Counter.builder("ute.utg.task.outbound").description("task outbound return to UTG").register(registry);
    }
}
